<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
	<head>
		<title>设置条件</title>
		<base target="_self">
	</head>
<%
 response.setHeader("Cache-Control","no-store");
 response.setDateHeader("Expires", 0);
 response.setHeader("Pragma","no-cache"); 
 String path = request.getContextPath();//web相对路径
%>
<link rel="stylesheet" href="<%=request.getContextPath()%>/jsp/webmanager/css/main_css.css" type="text/css" />
<script language="javaScript" src="<%=request.getContextPath()%>/jsp/webmanager/js/menu.js"></script>
<link rel="StyleSheet" href="<%=path%>/jsp/webmanager/css/dtree.css" type="text/css" />
<script type="text/javascript" src="<%=path%>/jsp/webmanager/js/dchecktree.js"></script>
<script type="text/javascript" src="<%=path%>/jsp/webmanager/js/qxgl.js"></script>
<script Language="JavaScript" src="<%=path%>/jsp/webmanager/js/check.js"></script>
<style type="text/css">
<!--
body {
	margin-left: 10px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	height:100%;
}
-->
</style>
<script type="text/javascript">
//弹出页面控制焦点;
//setInterval("window.focus()",1);
//选中条件
function selectedBmxx(conKey,conValue)
{
	document.forms[0].conKey.value=conKey;
	document.forms[0].conValue.value=conValue;
}
//返回选中条件
function doSubmit()
{
	var con = new Array();
	var flag = 0;
    for(i=0;i<document.forms[0].conKeys.length;i++)
	{
	   if(document.forms[0].conKeys[i].checked&&document.forms[0].conKeys[i].value!=0)
	   {
	   		if(flag>0)
	   		{
	   		  document.forms[0].conKey.value+=","+document.forms[0].conKeys[i].value;
	   		  document.forms[0].conValue.value+=";"+document.forms[0].conValues[i].value;
	   		}
	   		else
	   		{
	   		  document.forms[0].conKey.value+=document.forms[0].conKeys[i].value;
	   		  document.forms[0].conValue.value+=document.forms[0].conValues[i].value;	   		
	   		}
	   		flag++;
	   }
	}
	//if(document.forms[0].conValue.value==""||document.forms[0].conKey.value=="")
	//{
	//	con=null;
	//}
	//else
	//{
		con[0]=document.forms[0].conKey.value;
		con[1]=document.forms[0].conValue.value;
	//}
	window.returnValue =con;
	//opener.callback(con);
	window.close();
}
</script>
	<body>
	<form action="" method="post">
  <table border="0" width="150" cellpadding="0" cellspacing="0">
    <tr >
  <td height="5">
  <input type="hidden" name="conKey" >
  <input type="hidden" name="conValue" >
  </td>
  </tr>
  <tr >
  <td width="150">
  <s:set name="num" value="0"></s:set>
<div id="bmtree" class="dtree" style="overflow:scroll;width:290px;height:400px;">
<script type="text/javascript">
dtree = new dTree("dtree");
//dtree.config.target="_self";
<s:iterator  value="ymxztjList" status="index">
dtree.add("<s:property  value="conKey"/>","<s:property  value="sjbh"/>","<s:property  value="conValue"/>","","<s:property  value="isChecked"/>","_self");
<s:if test="sjbh=='-1'">
  <s:set name="num" value="1"></s:set>
</s:if>
</s:iterator>
<s:if test="#num==0">
dtree.add("0","-1","条件分类","","-1","_self");
</s:if>
document.write(dtree);
</script>
</div>
  </td>
  </tr>
  </table>
  <div class="butk">
<div class="btn_01">
<a href="#" onclick="doSubmit()">保&nbsp;存</a>
</div>
<div class="btn_01">
<a href="#" onclick="window.close();">关&nbsp;闭</a>
</div>
</div>
  </form>
	</body>
</html>
